<?php
namespace Home\Controller;

use Think\Controller;

use Common\Controller\BaseHomeController;

class IndexController extends BaseHomeController
{
    public function index()
    {
        $articles =  $this->lists("Article");

        foreach ($articles as $k => $val) {
            $articles[$k] = D("Article")->_format($val);
            $articles[$k]['create_time'] = getMyDate($articles[$k]['create_time']);

        }

        $this->assign('articles', $articles);
        $this->display();
    }
}